<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('Promoters/index')}">列表</a></li>
			<li><a href="{:U('Promoters/add')}">添加</a></li>
		</ul>
        <form class="well form-search" method="post" action="{:U('Promoters/index')}">
            <if condition="$isshow">
            代理商： 
			<select class="select_2" name="one_id">
				<option value="">全部</option>
				<volist name="proxys" id="v">
					<option value="{$v['id']}" <if condition="$formget.one_id eq $v['id']">selected</if> >{$v['user_nicename']}</option>
				</volist>
			</select> &nbsp;&nbsp;
            </if>
			业务员： 
			<input type="text" name="keyword" style="width: 200px;" value="{$formget.keyword}" placeholder="请输入业务员用户名、昵称...">
			<input type="submit" class="btn btn-primary" value="搜索">
		</form>	
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>用户名</th>
					<th>昵称</th>
					<th>用户总充值金额</th>
					<th>用户总消费金额</th>
					<th>主播总收益金额</th>
					<th>添加时间</th>
					<th>状态</th>
					<th width="150">操作</th>
				</tr>
			</thead>
			<tbody>
				<php>$user_statuses=array("0"=>L('已拉黑'),"1"=>'正常',"2"=>'未验证');</php>
				<foreach name="users" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.user_login}</td>
					<td>{$vo.user_nicename}</td>
					<td>{$vo.total_charge}</td>
					<td>{$vo.total_coin}</td>
					<td>{$vo.total_votes}</td>
					<td>{$vo.create_time}</td>

					<td>{$user_statuses[$vo['user_status']]}</td>
					<td>
							<a href='{:U("Promoters/edit",array("id"=>$vo["id"]))}'>编辑</a> | 
							<a class="js-ajax-delete" href="{:U('Promoters/delete',array('id'=>$vo['id']))}">删除</a> | 
							<if condition="$vo['user_status'] eq 1">
								<a href="{:U('Promoters/ban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="您确定要拉黑此用户吗？">拉黑</a>
							<else />
								<a href="{:U('Promoters/cancelban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="您确定要启用此用户吗？">启用</a>
							</if>
                            | <a href='{:U("Customer/index",array("one_id"=>$vo["id"]))}'>客户</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>